package ClassExercise;

import java.util.Scanner;

//从键盘上输入一串字符，统计字母、数字、空格的个数
public class Exercise1 {

    public static void main(String[] args) {
        int zimu=0;
        int num=0;
        int kongge=0;
        int other=0;
        Scanner sr = new Scanner(System.in);
        String str = sr.nextLine();
        for(int i = 0 ;i<str.length();i++){
            if(str.charAt(i)>='a'&&str.charAt(i)<='z' || str.charAt(i)>='A'&&str.charAt(i)<='z'){
                zimu++;
            }
             else if(str.charAt(i)==' '){
                kongge++;
            }
              else if (str.charAt(i)>='0'&&str.charAt(i)<='9'){
                  num++;
            }else{
                  other++;
            }
        }
        System.out.println("The number of zimu is："+zimu);
        System.out.println("The number of num is "+num);
        System.out.println("The number of kongge is " + kongge);
        System.out.println("The number of other is " + other);
    }
}
